package com.input;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
// 字节流
public class FileInputStreamDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("D:\\A.txt");

//        int i;
//        while ((i=fis.read())!=-1){
//            System.out.println((char)i);
//        }

        byte[] bys=new byte[2];
        int len;
        while ((len=fis.read(bys))!=-1){
            String s=new String(bys,0,len);
            System.out.print(s);
        }




        fis.close();

    }
}
